package com.example.chuntiao.cophook.beans;

/**
 * Created by chuntiao on 17-7-27.
 */

public class OrgDataSupport extends BaseDataSupport {
    private String oid;
    private String oname;
    private String superU;
    private String invitNum;
    private int imgVer;
    boolean open;

    public boolean isOpen() {
        return open;
    }

    public void setOpen(boolean open) {
        this.open = open;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    private String intro;


    public int getImgVer() {
        return imgVer;
    }

    public void setImgVer(int imgVer) {
        this.imgVer = imgVer;
    }

    public OrgDataSupport(String name, int id) {
        super();
        oname = name;
    }

    public OrgDataSupport() {
    }

    ;

    public OrgDataSupport(Org instance) {
        oid = instance.getOid();
        oname = instance.getOname();
        superU = instance.getSuperU();
        invitNum = instance.getInvitNum();
        imgVer = instance.getImgVer();
        intro = instance.getIntro();
        open=instance.isOpen();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof OrgDataSupport) {
            return oname.equals(((OrgDataSupport) obj).getOname());
        } else if (obj instanceof Org) {
            return oname.equals(((Org) obj).getOname());
        }
        return false;
    }

    @Override
    public void set(Object p) {
        Org orgInstance = (Org) p;
        oid = orgInstance.getOid();
        oname = orgInstance.getOname();
        superU = orgInstance.getSuperU();
        invitNum = orgInstance.getInvitNum();
        imgVer = orgInstance.getImgVer();
        intro = orgInstance.getIntro();
        open=orgInstance.isOpen();
    }

    public String getInvitNum() {
        return invitNum;
    }

    public void setInvitNum(String invitNum) {
        this.invitNum = invitNum;
    }

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public String getOname() {
        return oname;
    }

    public void setOname(String oname) {
        this.oname = oname;
    }

    public String getSuperU() {
        return superU;
    }

    public void setSuperU(String superU) {
        this.superU = superU;
    }

    public boolean equals(OrgDataSupport obj) {
        return super.equals(obj);
    }
}
